<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>right</title>
<link href="__PUBLIC__/Admin/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/css/jquery.datepick.css" />
<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.datepick.js"></script>

<script charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor.js"></script>
<script>
		KE.show({
		id : "contents",
		newlineTag:"br",
		afterChange : function(id) {
		KE.util.setData("contents");
		}
		});
</script>
</head>
<script type="text/javascript">

function checkform(){
	var myFrm = document.forms[0];
	title = myFrm.title.value;
	type  = myFrm.type.value;
	time  = myFrm.time.value;
	
	if (title==""){
		$("#warn1").html("新闻标题不为空");
		myFrm.title.select()
		return false;
	} else{
		$("#warn1").html("");
	}
	
	if (type=="0"){
		$("#warn2").html("新闻类别不为空");
		myFrm.title.select()
		return false;
	} else{
		$("#warn2").html("");
	}
	
	if (time==""){
		$("#warn3").html("新闻发布时间不为空");
		myFrm.title.select()
		return false;
	} else{
		$("#warn3").html("");
	}
}
</script>


<body>

<div id="container">
  <div id="main"> 
    <div id="content"> 
      <div class="weizhi"><span>当前位置：<{$position}></span></div>
      <br />
      <form onsubmit="return checkform()" action="__URL__/addNews" method="post" >
新闻标题：<input type="text" name="title" value=""/>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red" id="warn1"></span><br /><br />

新闻主类别：<select name="type">
		<option value="0">选择新闻类别</option>
		<volist name="newscategory" id="newscategory">
		
		<option value="<{$newscategory.id}>"><{$newscategory.type_name}></option>
		
		</volist>
		</select>
		&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red" id="warn2"></span><br /><br />
新闻副类别：<select name="subtype">
				<option value="0">选择新闻副类别</option>
				<volist name="newsubtype" id="vo">
				<option value="<{$vo.new_s_id}>"><{$vo.new_s_name}></option><br /><br />
				</volist>
			</select>
新闻发布时间：<input type="text" name="time" id="time" value="" />&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:red" id="warn3" ></span><script>
					$(document).ready(function(){
						$('#time').datepick({dateFormat: 'yy-mm-dd'}); 
					});
				</script><br /><br/>
新闻内容：<textarea cols='100' rows='20' name='contents' id='contents'></textarea><br /><br />

    <input type="submit" name="sub" value="添加" />
</form>
		
		        
		        
		        </div>
		        </div>
</div>
</body>